Release 10.1A: OpenEdge Data Management:
Database Administration


Data types and values

Table 2–8 lists the OpenEdge SQL data types and value limits.

Table 2–8: SQL data type limits
SQL data type
Limit
BIGINT
–9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
BINARY
2000 bytes
BIT
0 or 1
BIGINT
 
CHAR
2000 characters
DATE
Year: 1 to 9999; Month: 1 through 12; Date: 1 through the last day of the month.
DECIMAL
Defined in terms of precision and scale. Precision=number of digits; scale=number of digits to the right of the decimal point. Note that scale cannot be greater than precision. Precision is limited to 50. Scale is limited to 10.
DOUBLE PRECISION
2.2250738585072014E–308 through 1.7976931348623157E+308
FLOAT
2.2250738585072014E–308 through 1.7976931348623157E+308
INTEGER
–2,147,483,648 to 2,147,483,647
NUMERIC
Defined in terms of precision and scale. Precision=number of digits; scale=number of digits to the right of the decimal point. Note that scale cannot be greater than precision. Precision is limited to 50. Scale is limited to 10.
REAL
1.175494351E–38F to 3.402823466E+38F
SMALLINT
–32,768 to 32,767
TIME
00:00:00 to 23:59:59
TIMESTAMP
Combination of Date and Time limits.
TINYINT
–128 to 127
VARBINARY
31,995 bytes
VARCHAR
31,995

Table 2–9 lists the 4GL data types and value limits:

Table 2–9: 4GL data type limits 
4GL data type
Limit
BLOB
1GB
CHARACTER
Constrained by record size. (If a field has more than 32k bytes, you must write your own dump/reload procedure because the OpenEdge dump/reload procedure cannot handle fields larger than 32k bytes.)
CLOB
1GB
DATE
1/1/32768 B.C. to 12/31/32767 A.D.
DATE-TIME
Same limit as DATE. TIME limit is: 00:00:00 to 23:59:59
DATE-TIME-TZ
Same limit as DATE-TIME. Time zone (TZ) limit is:
–14:00 to +14:00
DECIMAL
50 digits total; 1 to 10 decimal places
INTEGER
–2,147,483,648 to 2,147,483,647.
LOGICAL
TRUE/FALSE, YES/NO.

Notes: Data columns created using the OpenEdge SQL environment and having a data type that is not supported in the Progress 4GL environment are not accessible by Progress 4GL applications. Data columns created using the Progress 4GL environment can be accessed by OpenEdge SQL applications and utilities.

Arrays of data can contain a maximum of 255 elements.

Table 2–10 describes data types supported by 4GL and their corresponding SQL data types:

Table 2–10: 4GL and SQL data type correspondence
4GL data type
OpenEdge SQL data type
CHARACTER
VARCHAR
DATE
DATE
DECIMAL
DECIMAL or NUMERIC
INTEGER
INTEGER
LOGICAL
BIT
RAW
VARBINARY
RECID
INTEGER
DATE-TIME
TIMESTAMP


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095